/*    */ package com.qmsk.business.bussBill.payCheckTotal.controller;
/*    */ 
/*    */ import com.qmsk.business.member.bussbillpaycheck.dao.BussBillPayCheckDao;
/*    */ import com.qmsk.business.member.bussbillpaypos.dao.BussBillPayPosDAO;
/*    */ import com.utils.basic.MapUtils;
/*    */ import com.utils.gson.out.GsonEbRst;
/*    */ import com.utils.web.RequestUtils;
/*    */ import com.utils.web.ResponseUtils;
/*    */ import java.sql.SQLException;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.apache.log4j.Logger;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.web.bind.annotation.PathVariable;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ 
/*    */ @Controller
/*    */ @RequestMapping({"payCkTotal"})
/*    */ public class PayCheckTotalController
/*    */ {
/* 40 */   private static final Logger logger = Logger.getLogger(PayCheckTotalController.class);
/*    */ 
/*    */   @Autowired
/*    */   private BussBillPayCheckDao checkDao;
/*    */ 
/*    */   @Autowired
/*    */   private BussBillPayPosDAO posDao;
/*    */ 
/*    */   @RequestMapping(value={"find/shopId/{shopId}/sum/{pageIdx}/{pageSize}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*    */   public void getListShopId(HttpServletRequest request, HttpServletResponse response, @PathVariable("shopId") String shopId, @PathVariable("pageIdx") Integer nPageIdx, @PathVariable("pageSize") Short nPageSize)
/*    */   {
/* 63 */     nPageSize = RequestUtils.getRequestValidPageSize(nPageSize);
/*    */     try {
/* 65 */       Map params = new HashMap();
/* 66 */       MapUtils.addToMap(params, "shopId", shopId);
/* 67 */       MapUtils.addToMap(params, "paid", RequestUtils.getInt(request, "paid"));
/* 68 */       MapUtils.addToMap(params, "bankId", RequestUtils.getLong(request, "bankId"));
/* 69 */       MapUtils.addToMap(params, "dtPaidStart", 
/* 70 */         RequestUtils.getDate(request, "dtPaidStart"));
/* 71 */       MapUtils.addToMap(params, "dtPaidEnd", 
/* 72 */         RequestUtils.getDate(request, "dtPaidEnd"));
/* 73 */       GsonEbRst gsonEbRst = null;
/* 74 */       if (RequestUtils.getInt(request, "checkType", Integer.valueOf(0)).intValue() == 1)
/* 75 */         gsonEbRst = this.checkDao.getGsonOfPayCKTotal(params, nPageIdx, nPageSize);
/*    */       else {
/* 77 */         gsonEbRst = this.posDao.getGsonOfPayCKTotal(params, nPageIdx, nPageSize);
/*    */       }
/* 79 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*    */     } catch (SQLException e) {
/* 81 */       logger.error(e);
/* 82 */       ResponseUtils.setErrorMsgResponse(
/* 83 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.bussBill.payCheckTotal.controller.PayCheckTotalController
 * JD-Core Version:    0.5.3
 */